pascal void modernEventProc(NavEventCallbackMessage callBackSelector,
NavCBRecPtr callBackParms, void* callBackUD)
{
...
switch(callBackSelector)
{
...
case kNavCBStart:
{
OSStatus theStatus = noErr;
AEDesc theLocation = {typeNull, NULL);
FSSpec theFSSpec;
theStatus = FSMakeFSSpec(...<your construction here>..., &theFSSpec);
if (theStatus != noErr) {... your error handling here ...}
theStatus = AECreateDesc(typeFSS, &theFSSpec, sizeof(FSSpec), &theLocation));
if (theStatus != noErr) {... your error handling here ...}
theStatus = NavCustomControl(callBackParms->context,
kNavCtlSetLocation, (void*)&theLocation);
if (theStatus != noErr) {... your error handling here ...}
}
...
}
...
}
|